<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../css/layout.css" rel="stylesheet" type="text/css" />
<smart>include file ='../head.config.html'</smart>
<script type="text/javascript" src="../js/jscalendar/calendar.js"></script>
<script type="text/javascript" src="../js/jscalendar/lang/calendar-en.js"></script>
<script type="text/javascript" src="../js/jscalendar/calendar-setup.js"></script>
<script type="text/javascript" src="../js/select_area_<smart> $versionarea </smart>.js"></script>
<script language="JavaScript" type="text/javascript" src="..<smart>$templatepath</smart>/javascript/jquery.easing.js"></script>
<script language="JavaScript" type="text/javascript" src="..<smart>$templatepath</smart>/javascript/jquery.color.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="../js/jscalendar/calendar-win2k-cold-1.css" title="win2k-cold-1" />
<script language='javascript'>
// JavaScript Document
$(function(){
	$('#receive').find('a.mobi').click(function(){
		receives=$(this).parent().parent().find('span').map(function(){return $(this).html();}).get().join("|||");
		receivearry=receives.split('|||');
		$('#txtReceiveName').val(receivearry[0]);
		selectprovince = receivearry[1];
		selectcity = receivearry[2];
		iniProvince(document.getElementById('txtProvince'));
		iniCity(document.getElementById('txtProvince'),document.getElementById('txtCity'));
		$('#txtAddress').val(receivearry[3]);
		$('#txtZip').val(receivearry[4]);
		$('#txtPhone').val(receivearry[5]);
		$('#txtMobilephone').val(receivearry[6]);
		$('#receive_id').val(receivearry[7]);
		$('.table_thC6ECF8_tdF6F6F6').find('caption').html('修改收货地址');
		$('#form_receive').attr('action','own_receive.php?action=modisave');
		$('#che').attr('src','..<smart>$templatepath</smart>/member/images/save_061226_01.gif');
		$('#add').css('display','inline');
	})
})
</script>
</head><body>
<div id="container760"> <smart>include file ='../header.html'</smart> <smart>include file ='own_menu.html'</smart>
  <div class="member_right">
    <div class="shop_nav_top"><span>收货地址</span></div>
    您可以预设您的购物收货地址。
    <table id="receive" class="table_thF5F5F5_tdfff">
      <tr>
        <th>收货人</th>
        <th>所在地</th>
        <th>详细地址</th>
        <th>邮编</th>
        <th>电话/手机</th>
        <th>操作</th>
      </tr>
      <smart> section name=i loop=$receive_array </smart>
      <tr>
        <td style="text-align:center"><span><smart> $receive_array[i].receive_name </smart></span> </td>
        <td><span><smart> $receive_array[i].province </smart></span> <span><smart> $receive_array[i].city </smart></span></td>
        <td><span><smart> $receive_array[i].address </smart></span></td>
        <td><span><smart> $receive_array[i].zip </smart></span></td>
        <td><span><smart> $receive_array[i].phone </smart></span><br />
          <span><smart> $receive_array[i].mobilephone </smart></span></td>
        <td style="text-align:center; width:60px"><span style="display:none"><smart> $receive_array[i].receive_id </smart></span><a href="#" class="mobi">修改</a>|<a href='own_receive.php?action=del&receiveid=<smart> $receive_array[i].receive_id </smart>'>删除</a> </td>
      </tr>
      <smart> /section </smart>
    </table>
    <form action="own_receive.php?action=addsave" method="post" name="form_receive" id="form_receive">
      <table class="table_thC6ECF8_tdF6F6F6">
        <caption class="fontsize14 b" style="line-height:2em">
        新增收货地址
        </caption>
        <tr>
          <th style="font-size:12px; text-align: center;">收货人姓名:</th>
          <td><input name="txtReceiveName" type="text" id="txtReceiveName" value="" />
            <span class="fontred">*</span></td>
        </tr>
        <tr>
          <th style="font-size:12px; text-align: center;">所在地区:</th>
          <td>省:
            <select name="txtProvince" id="txtProvince" onchange="javascript:iniCity(document.getElementById('txtProvince'),document.getElementById('txtCity'));">
            </select>
            市:
            <select name="txtCity" id="txtCity">
            </select>
            <span class="fontred">*</span></td>
        </tr>
        <tr>
          <th style=" font-size:12px; text-align: center;">详细地址:</th>
          <td><textarea name="txtAddress" cols="50" id="txtAddress"></textarea>
            <span class="fontred">*</span><span class="font999">(不需要重复填写省/市/区)</span></td>
        </tr>
        <tr>
          <th style="font-size:12px; text-align: center;">邮政编码:</th>
          <td><input name="txtZip" type="text" id="txtZip" value="" />
            <span class="fontred">*</span></td>
        </tr>
        <tr>
          <th style="font-size:12px; text-align: center;">电话号码:</th>
          <td><input name="txtPhone" type="text" id="txtPhone" value="" /></td>
        </tr>
        <tr>
          <th style="font-size:12px; text-align: center;">手机号码:</th>
          <td><input name="txtMobilephone" type="text" id="txtMobilephone" value="" /></td>
        </tr>
      </table>
      <div style="text-align:center"> <span class="font999">最多保存5个有效地址</span><br />
        <input name="che" style="width:59; height:25px" type="image" src="..<smart>$templatepath</smart>/member/images/zfb_040811_51.gif" id="che" />
        <a id="add" href="own_receive.php" style="display:none">新增收货地址</a>
        <input name="receive_id" type="hidden" id="receive_id" />
      </div>
    </form>
    <script language="javascript">
		selectprovince = "<smart> $member_array.province </smart>";
		selectcity = "<( $member_array.city )>";
		
		iniProvince(document.getElementById('txtProvince'));
		iniCity(document.getElementById('txtProvince'),document.getElementById('txtCity'));
	</script>
    <!--注意：修改的保存地址为own_receive.php?action=modisave。修改调用的XML页面为http://127.0.0.1/mulitishop/member/own_receive.xml.php?member_id=2&receive_id=2-->
  </div>
  <smart>include file ='../footer.html'</smart> </div>
</body>
</html>
